<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
<head>
    <title>资讯详情</title>

    <link rel="stylesheet" href="${ctx}/static/styles/news/newsdetail.css" type="text/css">
</head>

<body>
<div class="news-main">
    <div class="container row">
        <div class="col-lg-8 news-detail">
            <div class="news-header">
                <div class="news-back">
                    <a href="${ctx}/news/list">< 返回新闻列表</a>
                </div>
                <div class="news-title">
                    ${news.title}
                </div>
                <div class="news-info">
                    <span>作者：${news.author.name}</span>
                    <span>发布时间：<fmt:formatDate value="${news.publishDate}" type="date" dateStyle="long"/></span>
                    <span>浏览次数：100</span>
                </div>
            </div>
            <div class="news-body">
                ${news.content}
            </div>
        </div>
        <div class="news-aside">
            <div class="news-aside-main">
                <div class="news-aside-header">
                    最新更新
                </div>
                <ul class="news-aside-list">
                    <c:forEach items="${newNews}" var="news">
                        <li class="news-aside-item">
                            <span class="news-time">
                                <fmt:formatDate value="${news.publishDate}" type="date" dateStyle="default"/>
                            </span>
                            <a class="news-aside-title" href="#">${news.title}</a>
                        </li>
                    </c:forEach>
                </ul>
            </div>

        </div>
    </div>
</div>
</body>
</html>
